<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
	<title>Edit Resident</title>
	<link rel="stylesheet" href="<?php echo base_url();?>/application/development-bundle/themes/custom-theme/jquery.ui.all.css">
	<link rel="stylesheet" href="<?php echo base_url();?>/application/css/style.css">
	<script src="<?php echo base_url();?>/application/development-bundle/jquery-1.4.4.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.core.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.widget.js"></script>
	<script src="<?php echo base_url();?>/application/development-bundle/ui/jquery.ui.accordion.js"></script>
	<link rel="stylesheet" href="<?php echo base_url();?>/application/development-bundle/demos/demos.css">
	
	<script>
	$(function() {
		$( "#accordion" ).accordion({
			autoHeight: false,
			navigation: true,
			collapsible: true
		});
	});
	</script>
	
	<script>
	function OnSubmitForm(){
		if(document.pressed == "Edit Resident"){
			if(document.adminform.student_number.value!=""){
				document.adminform.action ="<?php echo base_url();?>/index.php/residentController/loadEditResidentView";
				return true;
			}else{
			alert("Please enter student number!");
			return false;}
		
		}else if(document.pressed == "Main Menu"){
			document.adminform.action ="<?php echo base_url();?>/index.php/adminPageController";
			return true;
		}
	}
	</script>
</head>
<body>

<div class="demo">
	
	<div id="header"><h1>ACCI eXtreme Information System</h1></div>

	<div id="accordion">
	
		<h3><a href="#section1">Edit a Resident</a></h3>
		<form name="adminform" method="post" onSubmit="return OnSubmitForm();">
			<h3>Resident's Information</h3>
			<div>
				<ul>
					<li>Student Number:<br/><input type="text" name="student_number"/></li>
				</ul>
				<input type="submit" value="Edit Resident" onClick="document.pressed=this.value" />
				<input type="submit" value="Main Menu" onClick="document.pressed=this.value" />
			</div>
		</form>
		
	</div><!-- End accordion -->

</div><!-- End demo -->

</body>
</html>
